From : Paul Burkey (paulb@sneech.demon.co.uk)
Subject : Blitting to single bitplanes of a bitmap and shadow effects
TC> What kind of "shadow" effects can one do with BitPlanesBitMap. I
TC> noticed this command in BUM 4 but did not understand how to apply it.
The shadow effect is very easy to apply although it does sort of waste a
lot of your palette depending on what you are doing. Before AGA was around
the EHB mode was quite popular for giving that extra range in palette. The
EHB mode used 6 planes of data although the pre-AGA machines could only
cope with a 32 colour palette. The EHB mode as you probably know gave you
the extra 32 colours by giving you half bright versions of these 32 colours.
If you take a bitmap that only uses the first 32 colours you will notice that
none of the 6th plane has been used.... Now, if you draw to that last plane
it will turn all the colours to their half bright equivelents.. If you know
enough about binary you will realise how this works...
In my game, I use a 256 colours but the second half of of the palette
is half as bright as the first so this gives me a sort of advanced EHB mode.
I have an 8 plane BitMap and I have a BitPlanesBitMap with 1 plane which is
in fact the last plane of the original. Now I can draw whatever I like to
the 8 plane bitmap and then use the 1 plane bitmap for extra drawing to create
shadow effects. Sometimes I Blit a 1 colour shape to it and sometimes I use
Boxf to make block shadows such as the ones from my Window GUI system.
I've seen the shadow effect used in a lot of places and I've also seen it
used in reverse where the initial screen display has all of the last plane
used up so in effect it's already "half bright".. then you can clear a section
of that last plane to form a bright spotlight effect :)